Register allocation for programs in SSA form

نویسنده

  • Sebastian Hack
چکیده

As register allocation is one of the most important phases in optimizing compilers, much work has been done to improve its quality and speed. We present a novel register allocation architecture for programs in SSA-form which simplifies register allocation significantly. We investigate certain properties of SSA-programs and their interference graphs, showing that they belong to the class of chordal graphs. This leads to a quadratic-time optimal coloring algorithm and allows for decoupling the tasks of coloring, spilling and coalescing completely. After presenting heuristic methods for spilling and coalescing, we compare our coalescing heuristic to an optimal method based on integer linear programming.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards Register Allocation for Programs in SSA-form

In this technical report, we present an architecture for register allocation on the SSA-form. We show, how the properties of SSA-form programs and their interference graphs can be exploited to develop new methods for spilling, coloring and coalescing. We present heuristic and optimal solution methods for these three subtasks.

متن کامل

Optimal register allocation for SSA-form programs in polynomial time

This paper gives a constructive proof that the register allocation problem for a uniform register set is solvable in polynomial time for SSA-form programs.  2006 Elsevier B.V. All rights reserved.

متن کامل

Register Allocation After Classical SSA Elimination is NP-Complete

Chaitin proved that register allocation is equivalent to graph coloring and hence NP-complete. Recently, Bouchez, Brisk, and Hack have proved independently that the interference graph of a program in static single assignment (SSA) form is chordal and therefore colorable in linear time. Can we use the result of Bouchez et al. to do register allocation in polynomial time by first transforming the...

متن کامل

Optimal Linear Time Colouring for Register Allocation within Static-Single-Assignment Programs

This paper prooves that for SSA programs the interference graph can be coloured optimally in linear time. The proof will proceed as follows: Section 2 presents some properties of SSA graphs, and the operation’s effect on creating the interference graph. Section 3 will show that the interference graph for SSA programs are chordal graphs. Section 4 will present an algorithm that can colour chorda...

متن کامل

Interconnect Optimization for High-Level Synthesis of SSA-Form Programs

Register Allocation for Programs in Static Single Assignment (SSA) Form has a Polynomial-Time Solution because interference graphs for procedures in this representation are chordal graphs. This paper explores a complementary problem which is NPComplete: the assignment of registers to variables in order to minimize interconnect costs. In particular, we attempt to minimize the size of the multipl...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006